﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Web;

/// <summary>
/// Summary description for Channel
/// </summary>
/// 
namespace ODM2KMZ.RSS
{

    public class Channel
    {

        public string link { get; set; }
        public string title { get; set; }
        public string description { get; set; }
        public string language { get; set; }
        public string copyright { get; set; }
        public string managingEditor { get; set; }
        public string webMaster { get; set; }
        public DateTime pubDate { get; set; }
        public DateTime lastBuildDate { get; set; }
        public string category { get; set; }
        public string generator { get; set; }
        public string docs { get; set; }
        public string cloud { get; set; }
        public string ttl { get; set; }
        public string image { get; set; }
        public string rating { get; set; }
        public string textInput { get; set; }
        public string skipHours { get; set; }
        public string skipDays { get; set; }
        public string feedURL { get; set; }


        public point point { get; set; }
        public List<item> items;
        public Channel()
        {
            //
            // TODO: Add constructor logic here
            //
            items = new List<item>();
            title = string.Empty;
            link = string.Empty;
            description = string.Empty;


        }

        public string pubDateString()
        {
            if (pubDate != null)
            {
                return pubDate.ToString("ddd, dd MMM yyyy hh:mm:ss 'GMT'");
            }

            return DateTime.UtcNow.ToString("ddd, dd MMM yyyy hh:mm:ss 'GMT'");

        }
        public string lastDateString()
        {
            if (pubDate != null)
            {
                return lastBuildDate.ToString("ddd, dd MMM yyyy hh:mm:ss 'GMT'");
            }

            return DateTime.UtcNow.ToString("ddd, dd MMM yyyy hh:mm:ss 'GMT'");

        }
    }
}